<?php
/**
 * Project     Newsletter for Joomla 1.5.x
 * Release     2.0.x
 * @package    Communicator
 * @subpackage Component
 * @version    $Id$
 * @link       http://joomlacode.org/gf/project/communicator/
 * @copyright  Copyright (c) 2008-2009 Erik Damke - All rights reserved
 * @license    http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php for details
 *
 * @Author:    Erik Damke (commjed@jocomail.de)
 */

// Ensure this file is included via Joomla Framework
defined('_JEXEC') or die('Restricted access');

class TOOLBAR_communicator
{
	/**
	* Draws the menu for a New Contact
	*/
	function EDIT_MENU() {
		JToolBarHelper::save( 'save', JText::_('E_SAVE'));
		JToolBarHelper::spacer();
		JToolBarHelper::cancel( 'cancel', JText::_('E_CANCEL'));
		JToolBarHelper::spacer();
	}
	function COMPOSE_MENU() {
		JToolBarHelper::save( 'composeNow', JText::_( 'E_SAVE' ));
		JToolBarHelper::spacer();
		JToolBarHelper::cancel( 'cancel', JText::_('E_CANCEL'));
		JToolBarHelper::spacer();
	}
	function CONFIRM_COMPOSE_MENU() {
		JToolBarHelper::save( 'save', JText::_('E_SAVE'));
		JToolBarHelper::spacer();
		JToolBarHelper::cancel( 'compose', JText::_('E_CANCEL'));
		JToolBarHelper::spacer();
	}
	function SEND_MENU() {
		JToolBarHelper::publish( 'sendMail' );
		JToolBarHelper::cancel( 'cancel', JText::_('CMN_CANCEL'));
		JToolBarHelper::spacer();
	}

   function CONFIG_MENU() {
      JToolBarHelper::title( JText::_( 'CM_COMMUNICATOR_CONFIGURATION' ), 'config.png' );

      JToolBarHelper::save('saveconfig', JText::_('E_SAVE'));
      JToolBarHelper::spacer();
      JToolBarHelper::cancel('cancelconfig', JText::_('E_CANCEL'));
   }

	function DEFAULT_MENU()
	{
	   JToolBarHelper::title( JText::_( 'CM_NEWSLETTER_MANAGEMENT' ), 'article.png' );

	   JToolBarHelper::publishList();
		JToolBarHelper::spacer();
		JToolBarHelper::unpublishList();
		JToolBarHelper::spacer();
		JToolBarHelper::divider();
		JToolBarHelper::spacer();
		JToolBarHelper::deleteList( '', 'remove', JText::_('CMN_DELETE'));
		JToolBarHelper::spacer();
		JToolBarHelper::editList( 'edit',  JText::_('E_EDIT'));
		JToolBarHelper::spacer();
		JToolBarHelper::addNew( 'new', JText::_('CMN_NEW'));
		JToolBarHelper::spacer();
		JToolBarHelper::addNew( 'compose', JText::_('Compose Newsletter'));
      JToolBarHelper::spacer();
	}

	function SUBSCRIBE_MENU() {
	   JToolBarHelper::title( JText::_( 'CM_SUBSCRIBER_MANAGEMENT' ), 'user.png' );

	  if( function_exists('getmxrr')) {
         JToolBarHelper::custom('validateEmails', 'validate_f2.png',  '', JText::_('CM_VALIDATE_MX'), true );
         JToolBarHelper::divider();
      }
      JToolBarHelper::custom( 'importSubscribers', 'upload.png', 'upload_f2.png', JText::_('CM_IMPORT_USERS'), false );
      JToolBarHelper::custom( 'exportSubscribers', 'archive.png', 'archive_f2.png', JText::_('CM_EXPORT_USERS'), false );
	   JToolBarHelper::divider();
      JToolBarHelper::custom('assignUsers', 'user_f2.png',  '', JText::_('CM_ASSIGN_USERS'), false );
	   JToolBarHelper::divider();
		JToolBarHelper::deleteList( '', 'deleteSubscriber', JText::_('CMN_DELETE') );
		JToolBarHelper::editList( 'editSubscriber', JText::_('CM_EDIT_SUBSCRIBER') );
		// JToolBarHelper::custom( 'deletenotconfirmed', 'delete.png', 'delete.png', JText::_('Remove not confirmed'), false );
      JToolBarHelper::addNew( 'editSubscriber', JText::_('CM_NEW_SUBSCRIBER') );
	}

	function SUBSCRIBER_EDIT_MENU() {
		JToolBarHelper::save( 'saveSubscriber', JText::_('E_SAVE') );
		JToolBarHelper::spacer();
		JToolBarHelper::cancel( 'subscribers', JText::_('E_CANCEL') );
		JToolBarHelper::spacer();
	}

	function SUBSCRIBER_IMPORT_MENU() {
		JToolBarHelper::save( 'importSubscribers', JText::_('E_SAVE') );
		JToolBarHelper::spacer();
		JToolBarHelper::cancel( 'subscribers', JText::_('E_CANCEL') );
		JToolBarHelper::spacer();
	}
}?>
